#ifndef __SCAN_PATCH_H 
#define __SCAN_PATCH_H 
#include "stdint.h"
#include "global.h"
#include "x86_disassemble.h"
#include "print.h"

typedef struct {
    uint32_t start_addr;
    uint32_t end_addr;
} SpcEntry;
typedef struct {
    uint32_t patch_addr;
    uint8_t Value_before_patching;
} PatchEntry;

extern PatchEntry patch_table[0x300];
extern int patch_count;
extern SpcEntry spc_table[0x500];
extern int spc_count;

bool search_for_spc(uint32_t addr_);

PatchEntry* Restore_Patch_Value (uint32_t addr_);

void x86_scan(void* addr_);

void x86_scan_patch_init(void);
#endif